Skip to content

Implement multi-language execution environment selection during planning phase#112

Merged
notfolder merged 4 commits intomainfrom
copilot/implement-multi-language-environment
Nov 30, 2025
Merged

Implement multi-language execution environment selection during planning phase#112
notfolder merged 4 commits intomainfrom
copilot/implement-multi-language-environment

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 29, 2025

Implements environment selection per MULTI_LANGUAGE_ENVIRONMENT_SPECIFICATION.md. The planning phase now selects an appropriate Docker image (Python, Miniforge, Node.js, Java, Go) based on project requirements, and the execution environment is started with that image.

Dockerfiles

  • Added docker/executor-{python,miniforge,node,java,go}/Dockerfile
  • All images include git, curl, wget, jq, tree pre-installed
  • Build via docker compose --profile executor-build build

Config

  • config.yaml: Added environments mapping and default_environment setting
  • docker-compose.yml: Added executor services under executor-build profile

ExecutionEnvironmentManager

  • get_available_environments() / get_default_environment() for environment discovery
  • prepare(task, environment_name) accepts optional environment selection
  • _create_container() returns (container_id, is_custom_image) tuple to skip git install on pre-built images
  • ContainerInfo includes environment_name attribute

PlanningCoordinator

  • _build_environment_selection_prompt() injects environment options into planning prompt
  • _extract_selected_environment() parses LLM's environment choice from plan response
  • State persistence includes selected_environment for pause/resume

Example LLM Response Format

{
  "goal_understanding": {...},
  "action_plan": {...},
  "selected_environment": {
    "name": "node",
    "reasoning": "package.json detected, TypeScript project"
  }
}

System Prompt

  • Updated system_prompt_command_executor.txt with environment table and package manager guides per environment
Original prompt

This section details on the original issue you should resolve

<issue_title>計画時に必要な言語環境を用意したイメージを選択して実行環境を起動する仕組み実装</issue_title>
<issue_description>docs/spec/MULTI_LANGUAGE_ENVIRONMENT_SPECIFICATION.md
に従って実装して
</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Nov 29, 2025
Copilot AI and others added 2 commits November 29, 2025 17:11
- Add 5 language-specific Dockerfiles (python, miniforge, node, java, go)
- Update docker-compose.yml with executor-build profile services
- Add environments config to config.yaml with image mappings
- Extend ExecutionEnvironmentManager with environment selection
- Add environment_name attribute to ContainerInfo
- Extend PlanningCoordinator with environment selection prompt
- Update system_prompt_command_executor.txt with library guide
- Add comprehensive unit tests for new functionality

Co-authored-by: notfolder <20558197+notfolder@users.noreply.github.com>
- Improve git installation logic in prepare() method
- Return (container_id, is_custom_image) tuple from _create_container()
- Import DEFAULT_ENVIRONMENTS constant in planning_coordinator.py
- Update unit tests for new return type

Co-authored-by: notfolder <20558197+notfolder@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement mechanism to launch environment with selected image Implement multi-language execution environment selection during planning phase Nov 29, 2025
Copilot AI requested a review from notfolder November 29, 2025 17:19
@notfolder notfolder marked this pull request as ready for review November 30, 2025 00:30
@notfolder notfolder merged commit 68d5bcc into main Nov 30, 2025
@notfolder notfolder deleted the copilot/implement-multi-language-environment branch November 30, 2025 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

計画時に必要な言語環境を用意したイメージを選択して実行環境を起動する仕組み実装

2 participants